package cn.itsource.hrm.feign;

import cn.itsource.hrm.domain.LoginUser;
import cn.itsource.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * feign模块与模块之间的数据调用，
 */
@FeignClient(value = "auth-server",fallbackFactory = LoginUserClientFellback.class )  //你要调的哪个服务，写上服务名，后面是熔断的写法。
@RequestMapping("/loginUser")  //要调用的哪个Controller
public interface ILoginUserClient {
    /**
     *    你要调用的哪个接口的抽象方法。
     * @param loginUser
     * @return
     */
    @PostMapping("/entering")
    AjaxResult entering(@RequestBody LoginUser loginUser);
}
